package model;

public class ContactModel {
	
	//Parameters
	public int parametersCount = 15;
	private String firstName = "";
	private String lastName = "";
	private String homeAddress = "";
	private String companyAddress = "";
	private String personMobilePhone = "";
	private String personHomePhone = "";
	private String professionalMobilePhone = "";
	private String professionalOfficePhone = "";
	private String homePage = "";
	private String professionalEmail = "";
	private String personalEmail = "";
	private String other = "";
	private String imagePath = "";
	private String group = "";
	private int id;
	
	public ContactModel(){
		
	}
	
	
	public ContactModel(String firstName, String lastName, String homeAddress,
			String companyAddress, String personMobilePhone,
			String personHomePhone, String professionalMobilePhone,
			String professionalOfficePhone, String homePage,
			String professionalEmail, String personalEmail, String other,
			String imagePath, String group, int id) {
		super();
		this.firstName = firstName;
		this.lastName = lastName;
		this.homeAddress = homeAddress;
		this.companyAddress = companyAddress;
		this.personMobilePhone = personMobilePhone;
		this.personHomePhone = personHomePhone;
		this.professionalMobilePhone = professionalMobilePhone;
		this.professionalOfficePhone = professionalOfficePhone;
		this.homePage = homePage;
		this.professionalEmail = professionalEmail;
		this.personalEmail = personalEmail;
		this.other = other;
		this.imagePath = imagePath;
		this.group = group;
		this.id = id;
	}


	/**
	 * Get full name
	 * @return
	 */
	public String getPersonName() {
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.append(firstName);
		stringBuilder.append(" ");
		stringBuilder.append(lastName);
		return stringBuilder.toString();
	}
	
	
	//Setter and Getter functions
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getHomeAddress() {
		return homeAddress;
	}
	public void setHomeAddress(String homeAddress) {
		this.homeAddress = homeAddress;
	}
	public String getCompanyAddress() {
		return companyAddress;
	}
	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}
	public String getPersonMobilePhone() {
		return personMobilePhone;
	}
	public void setPersonMobilePhone(String personMobilePhone) {
		this.personMobilePhone = personMobilePhone;
	}
	public String getPersonHomePhone() {
		return personHomePhone;
	}
	public void setPersonHomePhone(String personHomePhone) {
		this.personHomePhone = personHomePhone;
	}
	public String getProfessionalMobilePhone() {
		return professionalMobilePhone;
	}
	public void setProfessionalMobilePhone(String professionalMobilePhone) {
		this.professionalMobilePhone = professionalMobilePhone;
	}
	public String getProfessionalOfficePhone() {
		return professionalOfficePhone;
	}
	public void setProfessionalOfficePhone(String professionalOfficePhone) {
		this.professionalOfficePhone = professionalOfficePhone;
	}
	public String getHomePage() {
		return homePage;
	}
	public void setHomePage(String homePage) {
		this.homePage = homePage;
	}
	public String getProfessionalEmail() {
		return professionalEmail;
	}
	public void setProfessionalEmail(String professionalEmail) {
		this.professionalEmail = professionalEmail;
	}
	public String getPersonalEmail() {
		return personalEmail;
	}
	public void setPersonalEmail(String personalEmail) {
		this.personalEmail = personalEmail;
	}
	public String getOther() {
		return other;
	}
	public void setOther(String other) {
		this.other = other;
	}
	public String getImagePath() {
		return imagePath;
	}
	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}
	public String getGroup() {
		return group;
	}
	public void setGroup(String group) {
		this.group = group;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	/**
	 * Convert contactmodel to string, split by ';'
	 */
	public String toString(){
		StringBuilder builder = new StringBuilder();
		builder.append(this.firstName);
		builder.append(";");
		builder.append(this.lastName);
		builder.append(";");
		builder.append(this.homeAddress);
		builder.append(";");
		builder.append(this.companyAddress);
		builder.append(";");
		builder.append(this.personMobilePhone);
		builder.append(";");
		builder.append(this.personHomePhone);
		builder.append(";");
		builder.append(this.professionalMobilePhone);
		builder.append(";");
		builder.append(this.professionalOfficePhone);
		builder.append(";");
		builder.append(this.homePage);
		builder.append(";");
		builder.append(this.professionalEmail);
		builder.append(";");
		builder.append(this.personalEmail);
		builder.append(";");
		builder.append(this.other);
		builder.append(";");
		builder.append(this.imagePath);
		builder.append(";");
		builder.append(this.group);
		builder.append(";");
		builder.append(this.id);
		return builder.toString();
	}
	
	
}
